Ensures(T) Method (T)

CuttingEdge.Conditions

Returns a new ConditionValidator that allows you to validate the given argument, given it a default ArgumentName of 'value'.

Namespace:  CuttingEdge.Conditions
Assembly:  CuttingEdge.Conditions (in CuttingEdge.Conditions.dll)

Syntax

Visual Basic (Declaration)
Public Shared Function Ensures(Of T) ( _
	value As T _
) As ConditionValidator(Of T)
C#
public static ConditionValidator<T> Ensures<T>(
	T value
)
Visual C++
public:
generic<typename T>
static ConditionValidator<T>^ Ensures(
	T value
)
JavaScript
JavaScript does not support generic types or methods.

Parameters

value
Type: T
The value of the argument to validate.

Type Parameters

T
The type of the argument to validate.

Return Value

A new ConditionValidator containing the value and "value" as argument name.

Examples

For an example of the usage of Ensures see the Ensures<(Of <(T>)>)(T, String) overload.

See Also